package com.gscitysfy.cus.drain.modules.warning.controller;


import com.gscitysfy.cloudfrmwk.assistant.domain.Result;
import com.gscitysfy.cus.drain.modules.warning.service.IDrainWeatherImgService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 气象图片存储记录 前端控制器
 * </p>
 *
 * @author zhangqiang
 * @since 2022-10-22 15:46:15
 */
@RestController
@RequestMapping("/warning/drainWeatherImg")
public class DrainWeatherImgController {

    @Resource
    IDrainWeatherImgService drainWeatherImgService;


    @RequestMapping("/sateImgs")
    public Result<Object> sateImgs(String st, String et, String search) {
        if (StringUtils.isNotBlank(st) && StringUtils.isNotBlank(et)) {
            return Result.content(  drainWeatherImgService.getImgByTimeAndType(st, et,"weather_img_sate",search));
        } else {
            return Result.failure("没有选择时间段");
        }

    }
}
